// components/breakPage/breakPage.ts
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    title: {
      type: String,
      value: ""
    },
    isBreak: {
      type: Boolean,
      value: false
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    topSide: 0,
    leftSide: 0,
    rightSide: 0,
    bottomSide: 0,
    widthSide: 0,
    heightSide: 0
  },
  pageLifetimes: {
    // 页面被展示
    show: function () {
      const BC = wx.getMenuButtonBoundingClientRect();
      this.setData({
        topSide: BC.top,
        leftSide: BC.left,
        rightSide: BC.right,
        bottomSide: BC.bottom,
        widthSide: BC.width,
        heightSide: BC.height
      })
    }
  },
  /**
   * 组件的方法列表
   */
  methods: {
    breakPage() {
      wx.navigateBack({
        delta: 1
      });
    },
  }
})
